/*
 * pml_shift_and.h
 *
 *  Created on: 2013年9月9日
 *      Author: lius
 */

#ifndef PML_SHIFT_AND_H_
#define PML_SHIFT_AND_H_

#define charset_len 256

#if 1
#define BITS_INIT  0x0000000000000000
#define BITS_LOW   0x0000000000000001
typedef unsigned long BITS;
#else
#define BITS_INIT  0x00000000
#define BITS_LOW   0x00000001
typedef unsigned int BITS;
#endif


typedef struct _shift_and_s{
	BITS mask[charset_len];
	BITS match;
} shift_and_st;

int pml_shift_and_pre_proc(shift_and_st *st, unsigned char *pat, int pat_len);

int pml_shift_and_match(shift_and_st *st, unsigned char *str, int str_len);

#endif /* PML_SHIFT_AND_H_ */
